<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link href="./css/api.css" rel="stylesheet"/>
  <link href="./css/element.css" rel="stylesheet"/>
  <link href="./css/base.css" rel="stylesheet"/>
  <title>登录</title>
</head>
<body>
  <div id="vm" v-cloak>
    <div class="x-interl-table">
      <el-table :data="tableData" style="width: 100%" size="small" @row-click="clickrow">
        <el-table-column prop="username" label="姓名" min-width="60"></el-table-column>
        <el-table-column prop="gender" label="性别" width="45"></el-table-column>
        <el-table-column prop="job" label="求职意向" min-width="80"></el-table-column>
        <el-table-column prop="tel" label="联系方式" min-width="100"></el-table-column>
        <el-table-column prop="" label="操作" width="70">
          <template slot-scope="scope">
            <div class="x-change-per" @click.stop="openmanawin('entrymanagement','entrymanagement.html',scope.row.id,scope.row.area_id)">入职</div>
          </template>
        </el-table-column>

      </el-table>
    </div>
  </div>
  <script type="text/javascript" src="./script/vue.js"></script>
  <script type="text/javascript" src="./script/element.js"></script>
  <script type="text/javascript" src="./script/api.js"></script>
  <script type="text/javascript" src="./js/base.js"></script>
  <script>
    apiready = function () {
      api.addEventListener({
          name: 'entrysuss'
      }, function(ret, err) {
          vm.gettabledata()
      });
      //
    var vm = new Vue({
      el:'#vm',
      data(){
        return{
          tableData:[]
        }
      },
      created:function() {
        var that=this;

      },
      mounted:function(){
        var that=this;
        that.gettabledata()

      },
      methods: {
        clickrow:function(row,column,event){
          // console.log(JSON.stringify(row))
          //   console.log(JSON.stringify(column))
          //     console.log(JSON.stringify(event))
          openmanawin('seeassessment','seeassessment.html',row.id)
        },
        gettabledata:function(){
          var that=this;
          api.ajax({
            url:manaurltwo+'list',
            methods:'get',
            data:{
              values:{
                sec:$api.getStorage('usertoken'),
                type:'4'
              }
            }
          },function(ret,err){
            if(ret){
              api.hideProgress();
              console.log(JSON.stringify(ret));
              if(ret.status == 1){
                for(var i=0;i<ret.data.list.length;i++){
                  if(ret.data.list[i].gender=='2'){
                    ret.data.list[i].gender='女'
                  }else if(ret.data.list[i].gender=='1'){
                    ret.data.list[i].gender='男'
                  }
                }
                that.tableData = ret.data.list;

              }else{
                api.toast({
                    msg: ret.msg,
                    duration: 3000,
                    location: 'bottom'
                });
              }
            }else{
              api.hideProgress();
              console.log(JSON.stringify(err));
              api.toast({
                  msg: err.msg,
                  duration: 3000,
                  location: 'bottom'
              });
            }
          })
        },
      }
    })
    }
  </script>
</body>
</html>
